<?php if(!class_exists('raintpl')){exit;}?><form action = "<?php echo $action;?>" method = "post" class = "filter-date">
	<span style = 'margin:0 5px 0 0'>Date</span>
	<label for="from"></label>
	<input type="text" id="from" name="from" value = "<?php echo $from;?>" class = "input"/>
	<label for="to">-</label>
	<input type="text" id="to" name="to" value = "<?php echo $to;?>" class = "input"/>
	<input type = "submit" value = "filter">
</form>

<script>
$(function() {
	$( "#from" ).datepicker({
		changeMonth: true,
		dateFormat: "yy-mm-dd",
		onSelect: function( selectedDate ) {
			$( "#to" ).datepicker( "option", "minDate", selectedDate );
		}
	});
	$( "#to" ).datepicker({
		changeMonth: true,
		dateFormat: "yy-mm-dd",
		onSelect: function( selectedDate ) {
			$( "#from" ).datepicker( "option", "maxDate", selectedDate );
		}
	});
});
</script>